_Pragma("once");

#include "BasicDevice.h"


constexpr int32_t FILE_RETRY_COUNT = 3;

class SafeDataFile : public BasicDevice {
public:

    using BasicDevice::BasicDevice;

    ssize_t read (void *buffer, size_t size) ;

        /* Write N bytes of BUF to FD.  Return the number written, or -1.
       This function is a cancellation point and therefore not marked with
       __THROW.  */
    ssize_t write (const void *buffer, const size_t size);

};
